package com.fzkj.shejimoshi.facade2;

/**
 * @DESCRIPTION: TODO 外观类
 * @AUTHOR: AnotherOne
 * @DATE: 2021/8/16 16:10
 */
public class ShapeMaker implements Shape{

    private Shape shape;
    public ShapeMaker(Class<? extends Shape> clazz){
        try {
            shape = clazz.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void draw() {
        shape.draw();
    }
}
